package com.example.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @program: backend
 * @author: zk
 * @create: 2023-04-22 13:26
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_cart")
public class Cart {
    private static final long serialVersionUID = 1L;
    /**
     * 购物车中的物品id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private int id;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 产品id
     */
    private Long productId;
    /**
     * 产品数量
     */
    private int quantity;
    /**
     * 产品状态
     */
    private int productStatus;
    /**
     * 购物车中是否选中该产品
     */
    private int productSelected;

    /**
     * 商品总价
     */
    private double price;
}
